import { defineStore } from 'pinia';

export default defineStore('useTabBarStore', {
    state: () => {
        /* 获取是否有设置安全区域 */
        let safeArea = false;
        uni.getSystemInfo({
            success: function (res) {
                const model = ['X', 'XR', 'XS', '11', '12', '13', '14', '15', '16'];
                model.forEach(item => {
                    if (res.model.includes(item) && res.model.includes('iPhone')) {
                        safeArea = true;
                    }
                });
            }
        });
        return {
            list: [],
            safeArea,
            activeIndex: void 0
        };
    }
});
